/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.railway.app;

import com.railway.classes.Ticket;
import com.railway.utils.QRDecoderPanel;
import com.railway.utils.RestServer;
import com.railway.utils.Toast;
import java.awt.Color;
import java.awt.Graphics;
import java.awt.GridLayout;
import java.awt.Image;
import java.io.UnsupportedEncodingException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;
import javax.swing.AbstractButton;
import javax.swing.ButtonGroup;
import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JRadioButton;
import javax.swing.SwingUtilities;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

/**
 *
 * @author Kenny
 */
public class TicketChangePanel extends javax.swing.JPanel {

    Image imgArrow = new ImageIcon(this.getClass().getResource("/com/railway/image/arrow.png")).getImage();
    private QRDecoderPanel decoder = null;
    SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");  
    private JSONObject json;
    private JSONArray jsonArray;
    ButtonGroup bgSchedule = new ButtonGroup();
    String[][] myStringArray = new String [0][1];
    private int totalRadioButtonGenerated = 0;
    JRadioButton jRadioButton[] = new JRadioButton[0];
    private String shid= null;
    private String bookedDate = null;
    private String referenceNo = null;
    private String origin = null;
    private String destination = null;
    private boolean checked = false;
    JFrame topFrame = (JFrame) SwingUtilities.getWindowAncestor(this);
    private int proceed;
    private String code;
    /**
     * Creates new form RoutePanel
     */
    public TicketChangePanel() {
 
        initComponents();
        jCalendar.setVisible(false);
        jlblDateJourney.setVisible(false);
        jbtSearch.setVisible(false);
        this.checked=false;
    }
    

    
    
    private void checkItemCode(String refNo) {
        String result = RestServer.httpGet("ticketDetails", refNo);
        try {
            JSONObject json = new JSONObject(result);
            JSONArray content = json.getJSONArray("content");
            System.out.println(json);
            boolean error = json.optBoolean("error");
            if (!error) {
                int statuscode = json.getInt("status");
                String status = content.getJSONObject(0).get("status").toString();
                if (statuscode == 200) {
                    if(status.equalsIgnoreCase("PAD") ||status.equalsIgnoreCase("BKD") ){
                        jCalendar.setVisible(true);
                        jlblDateJourney.setVisible(true);
                        jbtSearch.setVisible(true);
                        this.shid = content.getJSONObject(0).getString("shid");
                        this.bookedDate = content.getJSONObject(0).getString("bookedDate");
                        this.referenceNo = content.getJSONObject(0).getString("referenceNo");
                        jlblReferenceNo.setText(content.getJSONObject(0).getString("referenceNo"));
                        Toast.makeText(getParent(), "Please proceed to amend the ticket", Toast.LENGTH_LONG).display();
                        this.proceed = 1;
                    }else if(status.equalsIgnoreCase("AMD")){
                        Toast.makeText(getParent(), "Ticket has already been amended once", Toast.LENGTH_LONG).display();
                        jlblReferenceNo.setText("-");
                        this.proceed = 0;
                        jCalendar.setVisible(false);
                        jlblDateJourney.setVisible(false);
                        jbtSearch.setVisible(false);
                    }
                } else {
                    Toast.makeText(getParent(), "QRcode is not valid ticket details", Toast.LENGTH_LONG).display();
                    jCalendar.setVisible(false);
                    jlblDateJourney.setVisible(false);
                    jbtSearch.setVisible(false);
                }
            } else {
                Toast.makeText(getParent(), "QRcode is not valid ticket details", Toast.LENGTH_LONG).display();
                jCalendar.setVisible(false);
                jlblDateJourney.setVisible(false);
                jbtSearch.setVisible(false);
            }
        } catch (JSONException ex) {
            System.out.println(ex);
            Toast.makeText(getParent(), "QRcode is not valid ticket details ", Toast.LENGTH_LONG).display();
            jlblReferenceNo.setText("-");
            jCalendar.setVisible(false);
            jlblDateJourney.setVisible(false);
            jbtSearch.setVisible(false);
        }
    }
    
    private void setOriginDestination(){
        String result = RestServer.httpGet("getOriginDestinationName", this.referenceNo);
        try {
            JSONObject json = new JSONObject(result);
            JSONArray content = json.getJSONArray("content");
            
            boolean error = json.optBoolean("error");
            if (!error) {
                int statuscode = json.getInt("status");
                if (statuscode == 200) {
                    String tempOrigin = content.getJSONObject(0).getString("origin");
                    String tempDestination = content.getJSONObject(0).getString("destination");
                    
                    if(tempOrigin.substring(0, 1).equals(" ")){
                        this.origin = tempOrigin.substring(1);
                    }else{
                        this.origin = tempOrigin;
                    }
                    
                    if(tempDestination.substring(0, 1).equals(" ")){
                        this.destination = tempDestination.substring(1);
                    }else{
                        this.destination = tempDestination;
                    }
                } else {
                    System.out.println("setOriginDestination not Found!");
                }
            } else {
                System.out.println("setOriginDestination error!");
            }
        } catch (JSONException ex) {
            System.out.println(ex);
        }
    }
    
    private String getRouteId(String shid){
        String rid = null;
        String result = RestServer.httpGet("getRouteByShId", shid);
        try {
            JSONObject json = new JSONObject(result);
            JSONArray content = json.getJSONArray("content");
            
            boolean error = json.optBoolean("error");
            if (!error) {
                int statuscode = json.getInt("status");
                if (statuscode == 200) {
                    rid=content.getJSONObject(0).getString("rid");
                } else {
                    System.out.println("getRouteId not Found!");
                }
            } else {
                System.out.println("getRouteId not Found!");
            }
        } catch (JSONException ex) {
            System.out.println(ex);
        }
        return rid;
    }
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jpTicketAmend = new javax.swing.JPanel();
        jPanel1 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        jpTicketSchedule = new javax.swing.JPanel();
        jpScanner = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jlblTicketReferenceNo = new javax.swing.JLabel();
        jlblReferenceNo = new javax.swing.JLabel();
        jButton2 = new javax.swing.JButton();
        jlblDateJourney = new javax.swing.JLabel();
        jCalendar = new com.toedter.calendar.JDateChooser();
        jbtSearch = new javax.swing.JButton();
        jpRouteArrow = new javax.swing.JPanel(){
            protected void paintComponent(Graphics g){
                super.paintComponent(g);
                g.drawImage(imgArrow, 0, 0, getWidth(), getHeight(), this);
            }
        };

        setPreferredSize(new java.awt.Dimension(870, 460));
        setLayout(null);

        jpTicketAmend.setBackground(new java.awt.Color(220, 220, 220));
        jpTicketAmend.setLayout(null);

        jButton1.setText("Amend");
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        jpTicketSchedule.setBorder(javax.swing.BorderFactory.createTitledBorder("Route Name     Schedule Name                   Departure                    Date                          Origin                          Destination  "));
        jpTicketSchedule.setAutoscrolls(true);

        javax.swing.GroupLayout jpTicketScheduleLayout = new javax.swing.GroupLayout(jpTicketSchedule);
        jpTicketSchedule.setLayout(jpTicketScheduleLayout);
        jpTicketScheduleLayout.setHorizontalGroup(
            jpTicketScheduleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 824, Short.MAX_VALUE)
        );
        jpTicketScheduleLayout.setVerticalGroup(
            jpTicketScheduleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 254, Short.MAX_VALUE)
        );

        jScrollPane1.setViewportView(jpTicketSchedule);

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(702, Short.MAX_VALUE)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18))
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 820, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()
                .addContainerGap(169, Short.MAX_VALUE)
                .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel1Layout.createSequentialGroup()
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 72, Short.MAX_VALUE)))
        );

        jpTicketAmend.add(jPanel1);
        jPanel1.setBounds(30, 190, 820, 230);

        javax.swing.GroupLayout jpScannerLayout = new javax.swing.GroupLayout(jpScanner);
        jpScanner.setLayout(jpScannerLayout);
        jpScannerLayout.setHorizontalGroup(
            jpScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 300, Short.MAX_VALUE)
        );
        jpScannerLayout.setVerticalGroup(
            jpScannerLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 170, Short.MAX_VALUE)
        );

        jpTicketAmend.add(jpScanner);
        jpScanner.setBounds(440, 10, 300, 170);

        jlblTicketReferenceNo.setText("Ticket Reference No");

        jlblReferenceNo.setText("                                ");

        jButton2.setText("Scan");
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        jlblDateJourney.setText("Date of Journey");

        jbtSearch.setText("Search");
        jbtSearch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtSearchActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jbtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jlblDateJourney)
                            .addComponent(jlblTicketReferenceNo, javax.swing.GroupLayout.PREFERRED_SIZE, 113, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addGap(11, 11, 11)
                                .addComponent(jlblReferenceNo, javax.swing.GroupLayout.PREFERRED_SIZE, 107, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 73, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, 201, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(28, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jlblTicketReferenceNo)
                    .addComponent(jlblReferenceNo)
                    .addComponent(jButton2))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jlblDateJourney)
                    .addComponent(jCalendar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jbtSearch)
                .addContainerGap(39, Short.MAX_VALUE))
        );

        jCalendar.setDateFormatString("yyyy-MM-dd");

        jCalendar.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N

        jCalendar.setMaxSelectableDate(new java.util.Date(253370739664000L));

        jCalendar.setMinSelectableDate(new Date());

        jCalendar.setBounds(120, 120, 250, 30);

        jpTicketAmend.add(jPanel2);
        jPanel2.setBounds(30, 40, 370, 140);

        add(jpTicketAmend);
        jpTicketAmend.setBounds(0, 20, 870, 440);

        javax.swing.GroupLayout jpRouteArrowLayout = new javax.swing.GroupLayout(jpRouteArrow);
        jpRouteArrow.setLayout(jpRouteArrowLayout);
        jpRouteArrowLayout.setHorizontalGroup(
            jpRouteArrowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 150, Short.MAX_VALUE)
        );
        jpRouteArrowLayout.setVerticalGroup(
            jpRouteArrowLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 20, Short.MAX_VALUE)
        );

        add(jpRouteArrow);
        jpRouteArrow.setBounds(180, 0, 150, 20);
    }// </editor-fold>//GEN-END:initComponents

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        jpTicketSchedule.setVisible(false);
        jpScanner.setVisible(true);
        if (decoder != null) {
            decoder.closeWebCam();
        }

        decoder = new QRDecoderPanel();
        jpScanner.add(decoder);
        new Thread(new Runnable() {
            @Override
            public void run() {
                while (true) {
                    if (decoder.isClosed()) {
                        if (!decoder.getDecodedID().equals("")) {
                            checkItemCode(decoder.getDecodedID());
                            code = decoder.getDecodedID();
                            jpScanner.setVisible(false);
                        }
                        break;
                    }
                }
            }
        }).start();
    }//GEN-LAST:event_jButton2ActionPerformed

    private void jbtSearchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtSearchActionPerformed
        String originEncoder;
        String originStationId = null;
        String destinEncoder;
        String destinStationId = null;
        setOriginDestination();
        System.out.println(this.origin);
        System.out.println(this.destination);
        System.out.println(this.referenceNo);
        System.out.println(this.getRouteId(this.shid));
        System.out.println();
        if(jCalendar.getDate()!=null){
            try{
                originEncoder = java.net.URLEncoder.encode(this.origin, "UTF-8").replace("+", "%20");
                String a = RestServer.httpGet("getStationIdByStationName",originEncoder.trim());
                JSONObject jsons = new JSONObject(a);
                JSONObject contents = jsons.getJSONObject("content");
                originStationId = contents.getString("sid");
                Toast.makeText(getParent(), "Loading schedule . . .", Toast.LENGTH_SHORT).display();
            }catch(JSONException ex) {
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(UnsupportedEncodingException ex){
                Toast.makeText(getParent(), ""+ex,  Toast.LENGTH_LONG).display();
            }catch(NullPointerException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }
            
            
            try{
                destinEncoder = java.net.URLEncoder.encode(this.destination, "UTF-8").replace("+", "%20");
                String b = RestServer.httpGet("getDestinationStationIdByStationName",destinEncoder.trim());
                JSONObject jsons = new JSONObject(b);
                JSONObject contents = jsons.getJSONObject("content");
                destinStationId = contents.getString("sid");
            }catch(JSONException ex) {
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(UnsupportedEncodingException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }catch(NullPointerException ex){
                Toast.makeText(getParent(), ""+ex, Toast.LENGTH_LONG).display();
            }

            Map<String, Object> data = new HashMap<>();
            data.put("routeid", getRouteId(this.shid));
            data.put("originid", originStationId);
            data.put("destinid", destinStationId);
            data.put("selectedDate", sdf.format(jCalendar.getDate()));

            String c = RestServer.httpPost("obtainSchedule",data);
            
            try {
                JSONObject json = new JSONObject(c);
                JSONObject content = json.getJSONObject("content");
                JSONArray origin = content.getJSONArray("infoOrigin");
                JSONArray destin = content.getJSONArray("infoDestin");
                
                jpTicketSchedule.removeAll();
                int length = origin.length();
                GridLayout layout = new GridLayout(length,1);
                layout.setHgap(1);
                layout.setVgap(1);
                jpTicketSchedule.setLayout(layout);
                jRadioButton = new JRadioButton[length];
                String selectedDate = sdf.format(jCalendar.getDate()).toString();
                myStringArray = new String [length][2];

                for(int i = 0 ; i < length ; i++){
                        myStringArray[i][0] = "A "+origin.getJSONObject(i).getString("routeName");
                        myStringArray[i][1] = "B "+origin.getJSONObject(i).getString("scheduleName");
                        jRadioButton[i] = new javax.swing.JRadioButton(""+origin.getJSONObject(i).getString("routeName")+  "             "+origin.getJSONObject(i).getString("scheduleName")+ "            "
                                                + "                    "+origin.getJSONObject(i).getString("departureTime")+ "                  " +selectedDate+"              " 
                                                + origin.getJSONObject(i).getString("stationName")+     "             "
                                                + "          "+destin.getJSONObject(i).getString("stationName")); 

                        jpTicketSchedule.add(jRadioButton[i]);
                        bgSchedule.add(jRadioButton[i]);
                        totalRadioButtonGenerated++;
                }
                jRadioButton[0].setSelected(true);
                
                
                jpTicketSchedule.setVisible(true);
                jpTicketSchedule.revalidate();
                jpTicketSchedule.repaint();
                
                
                this.checked = true;
            } catch (JSONException ex) {
                Toast.makeText(getParent(), "No schedule found!", Toast.LENGTH_LONG).display();
            }
        }else{
            Toast.makeText(getParent(), "Please select date !", Toast.LENGTH_LONG).display();
        }

    }//GEN-LAST:event_jbtSearchActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        checkItemCode(this.code);
        Ticket.setReferenceNo(this.referenceNo);
        if(referenceNo.equals("")|| referenceNo.equals("-")){
            Toast.makeText(getParent(), "Please scan QR code ticket first", Toast.LENGTH_LONG).display();
        }else if(proceed==1){
            if(!checked){
                Toast.makeText(getParent(), "Please select schedule", Toast.LENGTH_LONG).display();
            }else if(checked){

                String text = getSelectedButtonText(bgSchedule);
                int j = 0;
                String[] listed = text.split("  ");


                String[] details = new String[1000];
                for(int i = 0 ; i < listed.length ; i++){
                    if(!listed[i].equals("")){
                        details[j] = listed[i];
                        j++;
                    }
                }



                String a = RestServer.httpGet("scheduleIdByName", details[1].toString().trim());
                String scheduleID = null;
                try{
                    JSONObject json = new JSONObject(a);
                    JSONArray content = json.getJSONArray("content");
                    scheduleID = content.getJSONObject(0).getString("shid");
                    Ticket.setShid(scheduleID);
                    Ticket.setClasses(details[1].trim());
                    Ticket.setDepatureTime(details[2]);
                    Ticket.setBookedDate(details[3]);
                    Ticket.setOrigin(details[4]);
                    Ticket.setDestination(details[5]);

                    System.out.println("Ticket Details");
                    System.out.println("Ticket Class:"+ Ticket.getClasses());
                    System.out.println("Ticket Date: "+Ticket.getBookedDate());
                    System.out.println("Ticket Origin: "+Ticket.getOrigin());
                    System.out.println("Ticket Destination: "+Ticket.getDestination());
                    System.out.println("Ticket Time: "+Ticket.getDepatureTime());

                    SeatAmendDialog seatAmend = new SeatAmendDialog(null, true, topFrame);
                    seatAmend.setVisible(true); 
                }catch(JSONException ex){
                    System.out.println(ex);
                }
            }
        }else if(proceed==0){
            //Display Toast msg 'Ticket has already amended'
        }
    }//GEN-LAST:event_jButton1ActionPerformed

    public String getSelectedButtonText(ButtonGroup buttonGroup) {
        for (Enumeration<AbstractButton> buttons = buttonGroup.getElements(); buttons.hasMoreElements();) {
            AbstractButton button = buttons.nextElement();
            if (button.isSelected()) {
                return button.getText();
            }
        }
        return null;
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private com.toedter.calendar.JDateChooser jCalendar;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JButton jbtSearch;
    private javax.swing.JLabel jlblDateJourney;
    private javax.swing.JLabel jlblReferenceNo;
    private javax.swing.JLabel jlblTicketReferenceNo;
    private javax.swing.JPanel jpRouteArrow;
    private javax.swing.JPanel jpScanner;
    private javax.swing.JPanel jpTicketAmend;
    private javax.swing.JPanel jpTicketSchedule;
    // End of variables declaration//GEN-END:variables
}
